package com.mewp.permissions.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mewp.permissions.model.po.SysRole;
import com.mewp.permissions.model.vo.AssginRoleVO;
import com.mewp.permissions.model.vo.SysRoleQueryVo;

import java.util.Map;

/**
 * @author mewp
 * @version 1.0
 * @date 2023/7/28 01:55
 */
public interface SysRoleService extends IService<SysRole> {
    Page<SysRole> selectPage(Integer page, Integer size, SysRoleQueryVo roleQueryVo);

    /**
     * 根据用户获取角色数据
     *
     * @param userId 用户id
     * @return 角色列表
     */
    Map<String, Object> getRolesByUserId(Long userId);

    /**
     * 分配角色
     *
     * @param assginRoleVo 分配的角色
     * @return true/false
     */
    boolean doAssign(AssginRoleVO assginRoleVo);
}
